public class TestString2 {
	public static void main(String[] args) {
		String str = "AaaaABBBBcc&^%adfsfdCCOOkk99876 _haHA";
		int cU=0,cL=0,cO=0,i;
		char c;
		for(i=0;i<str.length();i++) {
			c=str.charAt(i);
			if(c>='a' && c<='z') {
				cL++;
			} else if(c>='A' && c<='Z') {
				cU++;
			} else {
				cO++;
			}
		}
		System.out.println("cL="+cL+" cU="+cU+" cO="+cO);
	}
}